using System.ComponentModel.DataAnnotations;
using Framework.SqlDataAccess.Model;

namespace Kaysite.Model
{
    public class User : KaysiteModel
    {
        [DBMaping(PrimaryKey = true)]
        [Required]
        public int UserID { get; set; }

        [DBMaping]
        [Required]
        [StringLength(256)]
        public string UserName { get; set; }

        [DBMaping]
        [StringLength(512)]
        public string Email { get; set; }

        [DBMaping]
        [Required]
        [StringLength(1024)]
        public string Password { get; set; }

        [DBMaping]
        [Required]
        [StringLength(512)]
        [DBFieldInfo(IsName = true)]
        public string DisplayName { get; set; }

        [DBMaping]
        [Required]
        public eRole RoleID { get; set; }

        [DBMaping]
        [Required]
        public eUserStatus StatusID { get; set; }

        public User()
        {
            RoleID = eRole.User;
            StatusID = eUserStatus.Active;
        }
    }
}